package cc.idoone.spring_boot_hello.h2;

import cc.idoone.spring_boot_hello.h2.jpa.StaffBo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @auther hemj
 * @since 2017/9/24
 */
public interface StaffService {

	void createTable();

	void save();

	List<StaffBo> findAll();

	StaffBo findByName();

	List<StaffBo> findByUserNameIgnoreCase(String name);

	List<StaffBo> findByUserIdAndUserNameAllIgnoreCase(String id, String name);

	List<StaffBo> getByMinAge(int minAge);

	public StaffBo findByUserId(String id);

	public Page<StaffBo> findByAgeGreaterThan(Integer age, Pageable pageable);

	public int increaseAge(int after, int before);

}
